//
//  CommonTools.swift
//  weibo28
//
//  Created by 范英强 on 16/3/24.
//  Copyright © 2016年 范英强. All rights reserved.
//

// 类似于OC中的pch 文件
import UIKit

// app 主题颜色
let themeColor = UIColor.orangeColor()
// 屏幕的宽度和高度
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height

// OAuth 一些相关信息
let AppKey = "3514709234"
let AppSecret = "b996fe880460b561ff814a0fef20e7b2"
let Redirect_uri = "http://www.baidu.com"

// 切换根视图通知
let SwitchRootVcNotification = "SwitchRootVcNotification"

// 设置颜色
func RGB(red red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor{
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1)
}
// 随机颜色
func RandomColor() -> UIColor{
    let r = random()%256
    let g = random()%256
    let b = random()%256
    return RGB(red: CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}






